import request from '@/utils/request'

// 获取订单列表
export function getOrders(params) {
  return request({
    url: '/api/orderMain',
    method: 'post',
    data: params
  })
}

// 根据ID获取订单详情
export function getOrderDetail(id) {
  return request({
    url: `/api/orderMain/byid?id=${id}`,
    method: 'post'
  })
}

// 创建订单
export function createOrder(orderData) {
  return request({
    url: '/api/orderMain/add',
    method: 'post',
    data: orderData
  })
}